/*============================
*	File Name: main.c
*	Created Date: 12/16/2021 5:16:26 PM
*	Last Modified Date:12/17/2021 11:47:28 AM
*	Author: mistgc
*	Email: georgecai0908@outlook.com
============================*/
#include <stdio.h>
#include "Pet.h"
#include "Dog.h"
#include "Cat.h"

int main(){
	Dog dog;
	Cat cat;

	Dog_ctor(&dog, "来福", 2);		//黑色
	Cat_ctor(&cat, "鱼白", 1);		//白色

	printf("%s: %s\n", Pet_getName(&dog.super), Dog_getColor(&dog));
	printf("%s: %s\n", Pet_getName(&cat.super), Cat_getColor(&cat));

	Pet *p;

	p = (Pet *)&dog;
	Pet_eat(p);

	p = (Pet *)&cat;
	Pet_eat(p);

	return 0;
}
